package com.night.ibatis;

import com.night.annotation.Autowired;
import com.night.annotation.Bean;
import com.night.annotation.Configuration;

import javax.sql.DataSource;

/**
 * @Author: chen yang
 * @Date: 2024/12/12 20:01
 */
@Configuration
public class MapperConfiguration {

    @Bean
    public MapperBeanPostProcessor mapperBeanPostProcessor() {
        return new MapperBeanPostProcessor();
    }


    @Bean
    public MapperInvocationHandler mapperInvocationHandler(@Autowired DataSource dataSource){
        return new MapperInvocationHandler(dataSource);
    }
}
